package com.ccgk.logistics.service;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import com.ccgk.common.page.PaginationVo;
import com.ccgk.logistics.domain.Order;

public interface OrderService {
	
	static class OrderCriteria{
		private Map<Integer,Object> params = new HashMap<Integer,Object>();
		
		/**
		 * 订单编码模糊检索
		 */
		public OrderCriteria orderCodeLike(String orderCode){
			params.put(1,orderCode);
			return this;
		}
		
		/**
		 * mbl模糊检索
		 */
		public OrderCriteria mblCodeLike(String mblCode){
			params.put(2,mblCode);
			return this;
		}
		
		/**
		 * 客户精确检索
		 */
		public OrderCriteria customerEqual(Integer customerId){
			params.put(3,customerId);
			return this;
		}
		
		public Map<Integer,Object> getParams(){
			return Collections.unmodifiableMap(params);
		}
	}
	
	Integer add(Order order);
	
	Order getById(int id);
	
	Integer update(Order order);
	
	Integer delete(int id);
	
	PaginationVo<Order> findList(OrderCriteria criteria, int currentPage,
			int pageSize);

	void batchDelete(Integer[] idIntArray);

	Order getByOrderCode(String orderCode);

}
